Skip to content

Serialize property display - #461

Open
jm318 wants to merge 4 commits into
w3c:mainfrom
jm318:string
Open

jm318 wants to merge 4 commits into
w3c:mainfrom
jm318:string

Conversation

@jm318

@jm318 jm318 commented Aug 22, 2017

Copy link
Copy Markdown
Contributor

Add description for serializing 'display' property.

@jm318

jm318 commented Aug 22, 2017

Copy link
Copy Markdown
Contributor Author

@shans PTAL. Thanks!

@jm318

jm318 commented Aug 22, 2017

Copy link
Copy Markdown
Contributor Author

@shans PTAL. Thanks!

@shans

shans commented Aug 22, 2017

Copy link
Copy Markdown
Contributor

LGTM. @tabatkins ?

@shans
shans requested a review from tabatkins August 22, 2017 06:21
Comment thread css-typed-om/Overview.bs Outdated
: 'display'
::
1. Let |values| initially be the empty [=list=].
2. If 'display-outside' or 'display-inside' is specified:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These properties don't exist. You probably mean the <<display-inside>> and <<display-outside>> values. ^_^

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks for pointing out! :)

Comment thread css-typed-om/Overview.bs Outdated
::
1. Let |values| initially be the empty [=list=].
2. If 'display-outside' or 'display-inside' is specified:
1. Append value of 'display-outside' to |values|.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value is an abstract CSS value; need to serialize it to produce a JS value. (Same applies to all the steps.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

Comment thread css-typed-om/Overview.bs
2. If 'display-outside' or 'display-inside' is specified:
1. Append value of 'display-outside' to |values|.
2. Append value of 'display-inside' to |values|.
3. Goto step 7.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means you won't hit the list-item step at all if you specified something like display: block list-item.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and I understand this is what the spec says according to "|", i.e. these are mutually exclusive?

Comment thread css-typed-om/Overview.bs Outdated
2. Append value of 'display-inside' to |values|.
3. Goto step 7.
3. If 'display-listitem' is specified:
1. Append ''list-item'' to |values|.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Append a string, "list-item", not a CSS value ''list-item''.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread css-typed-om/Overview.bs Outdated
1. Append its value to |values|.
2. Goto step 7.
7. If |values| is:
1. ''block flow'', return 'block'.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

|values| is a list of strings, not a sequence of CSS values. Needs to be «"block", "flow"», per the Infra Standard.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And 'block' isn't a valid property, and should be a string instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks for pointing out!

Comment thread css-typed-om/Overview.bs Outdated
11. ''inline ruby'', return ''ruby''.
12. ''block table'', return ''table''.
13. ''inline table'', return ''inline-table''.
14. [=list/empty=], return "none".

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does it end up empty, and how does emptiness equate to display: none? none is handled by the <<display-box>> clause in step 5, right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it would be empty if property is simply "display:", but I guess it's illegal anyway. So I removed the case for empty-list.

@jm318

jm318 commented Aug 23, 2017

Copy link
Copy Markdown
Contributor Author

tabatkins@ I've addressed your comments, PTAL, thanks!

Base automatically changed from master to main February 2, 2021 19:47

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants